PM_FUNC_NORM_ATTRIB SKILL:SkillBubble( SKILL_CALL:iCall, Int:id )
{
	switch( iCall )
	{
		case CALL_REGISTER: return SkillRegister( .Name = "Bubble", .Type = TYPE_WATER, .callTypes = CALL_BIND_DOWN, .PP = 30, .Charges = 5, .DelayTime = 10.0 );
		case CALL_HELP:     return SkillHelp( "Shoots short range bubbles." );
		case CALL_BIND_DOWN:
		{
			SoundEmit( id, SOUND_SWIM );

			new Int:iDamage = StatClamp( id, STAT_ATTACK, 30, 70 );
			new Int:iEnt = EntitySkillCreate( .iPlayer = id,
											.iProperty = SEP_TOUCH|SEP_DAMAGE|SEP_KILL,
											.fKillTime = 1.0,
											.iDamage = iDamage,
											.iMoveType = MOVETYPE_FLY,
											.iSolidType = SOLID_TRIGGER,
											.iSound = SOUND_SWIM,
											.iModel = MODEL_POKEBALL,
											.iSprite = SPRITE_BUBBLE,
											.bPlayerOrigin = true,
											.bPlayerAngles = true,
											.vMins = Vector:{-5.0,-5.0,-5.0},
											.vMaxs = Vector:{5.0,5.0,5.0},
											.iAimVelocity = StatClamp( id, STAT_SPEED, 400, 600 )
										);

			EntitySetSpriteModel( iEnt, SPRITE_BUBBLE );

			EffectBeamFollow( .iEnt = iEnt,
								.iSprite = SPRITE_BUBBLE,
								.fLife = 1.0,
								.iWidth = iDamage / 5,
								.iRed = 0,
								.iGreen = 0,
								.iBlue = 255,
								.iBrightness = 200
							);

			return SKILL_USED_PAUSE;
		}
	}
	return SKILL_READY;
}

PM_FUNC_NORM_ATTRIB SKILL:SkillBubblebeam( SKILL_CALL:iCall, Int:id )
{
	switch( iCall )
	{
		case CALL_REGISTER: return SkillRegister( .Name = "Bubblebeam", .Type = TYPE_WATER, .callTypes = CALL_SPAWN|CALL_BIND_DOWN, .PP = 20, .Charges = 5, .DelayTime = 5.0 );
		case CALL_HELP:     return SkillHelp( "Damages and may decrease Speed." );
		case CALL_SPAWN:
		{
			gSkillVariable[ id ] = StatClamp( id, STAT_SPECIAL, 10, 30 );
		}
		case CALL_BIND_DOWN:
		{
			if ( gSkillVariable[ id ] )
			{
				SoundEmit( id, SOUND_SWIM );

				gSkillVariable[ id ]--;
				client_print( id, print_center, "Bubblebeams: %d", gSkillVariable[ id ] );

				new Int:iMaxDamage = StatClamp( id, STAT_ATTACK, 20, 40 );
				new Float:fRadius = StatClamp( id, STAT_ATTACK, 50.0, 100.0 );

				new Coord:cOrigin[3], Coord:cAim[3];
				get_user_origin( id, cOrigin );
				PlayerAimOrigin( id, cAim );

				SkillLineDamage( .attacker = id,
								.cStart = cOrigin,
								.cEnd = cAim,
								.fRadius = fRadius,
								.iMaxDamage = iMaxDamage,
								.flags = AOE_IGNORE_ATTACKER | AOE_VICTIM_TEAM | AOE_MAXIMIZE_DAMAGE
								);

				message_begin( MSG_BROADCAST, SVC_TEMPENTITY );	//message begin
				write_byte( TE_SPRITETRAIL );
				write_coord( cOrigin[0] );		// start position
				write_coord( cOrigin[1] );
				write_coord( cOrigin[2] );
				write_coord( cAim[0] );			// end position
				write_coord( cAim[1] );
				write_coord( cAim[2] );
				write_short( SPRITE_INDEX[ SPRITE_BUBBLE ] );		// sprite index
				write_byte( iMaxDamage );		// count
				write_byte( 10 );				// life in 0.1's
				write_byte( 5 );				// scale in 0.1's
				write_byte( 5 );				// velocity along vector in 10's
				write_byte( 5 );				// randomness of velocity in 10's
				message_end()

				return SKILL_USED_PAUSE;
			}
			else
			{
				client_print( id, print_center, "No Bubblebeams Left" );
				return SKILL_DENY;
			}
		}
	}
	return SKILL_READY;
}

PM_FUNC_NORM_ATTRIB SKILL:SkillClamp( SKILL_CALL:iCall, Int:id )
{
	#pragma unused id
	switch( iCall )
	{
		case CALL_REGISTER: return SkillRegister( .Name = "Clamp", .Type = TYPE_WATER, .callTypes = CALL_BIND_DOWN, .PP = 10, .Charges = 1, .DelayTime = 1.0 );
		case CALL_HELP:     return SkillHelp( "Pokemon attacks 2 to 5 times in a row." );
		case CALL_BIND_DOWN:
		{
			return SKILL_USED;
		}
	}
	return SKILL_READY;
}

PM_FUNC_NORM_ATTRIB SKILL:SkillCrabhammer( SKILL_CALL:iCall, Int:id )
{
	#pragma unused id
	switch( iCall )
	{
		case CALL_REGISTER: return SkillRegister( .Name = "Crabhammer", .Type = TYPE_WATER, .callTypes = CALL_BIND_DOWN, .PP = 10, .Charges = 1, .DelayTime = 1.0 );
		case CALL_HELP:     return SkillHelp( "Good chance for getting critical hit." );
		case CALL_BIND_DOWN:
		{
			return SKILL_USED;
		}
	}
	return SKILL_READY;
}

PM_FUNC_NORM_ATTRIB SKILL:SkillHydroPump( SKILL_CALL:iCall, Int:id )
{
	#pragma unused id
	switch( iCall )
	{
		case CALL_REGISTER: return SkillRegister( .Name = "Hydro Pump", .Type = TYPE_WATER, .callTypes = CALL_BIND_DOWN, .PP = 5, .Charges = 1, .DelayTime = 1.0 );
		case CALL_HELP:     return SkillHelp( "Damages." );
		case CALL_BIND_DOWN:
		{
			return SKILL_USED;
		}
	}
	return SKILL_READY;
}

PM_FUNC_NORM_ATTRIB SKILL:SkillSurf( SKILL_CALL:iCall, Int:id )
{
	#pragma unused id
	switch( iCall )
	{
		case CALL_REGISTER: return SkillRegister( .Name = "Surf", .Type = TYPE_WATER, .callTypes = CALL_BIND_DOWN, .PP = 15, .Charges = 1, .DelayTime = 1.0 );
		case CALL_HELP:     return SkillHelp( "Damages the target." );
		case CALL_BIND_DOWN:
		{
			return SKILL_USED;
		}
	}
	return SKILL_READY;
}

PM_FUNC_NORM_ATTRIB SKILL:SkillWaterGun( SKILL_CALL:iCall, Int:id )
{
	switch( iCall )
	{
		case CALL_REGISTER: return SkillRegister( .Name = "Water Gun", .Type = TYPE_WATER, .callTypes = CALL_SPAWN|CALL_BIND_DOWN, .PP = 25, .Charges = 10, .DelayTime = 5.0 );
		case CALL_HELP:     return SkillHelp( "Shoots a beam of water." );
		case CALL_SPAWN:
		{
			gSkillVariable[ id ] = StatClamp( id, STAT_SPECIAL, 50, 100 );
		}
		case CALL_BIND_DOWN:
		{
			if ( gSkillVariable[ id ] )
			{
				SoundEmit( id, SOUND_SWIM );

				gSkillVariable[ id ]--;
				client_print( id, print_center, "Water Guns: %d", gSkillVariable[ id ] );

				new Int:iMaxDamage = StatClamp( id, STAT_ATTACK, 10, 30 );
				new Float:fRadius = StatClamp( id, STAT_ATTACK, 50.0, 100.0 );

				new Coord:cOrigin[3], Coord:cAim[3];
				get_user_origin( id, cOrigin );
				PlayerAimOrigin( id, cAim );

				SkillLineDamage( .attacker = id,
								.cStart = cOrigin,
								.cEnd = cAim,
								.fRadius = fRadius,
								.iMaxDamage = iMaxDamage,
								.flags = AOE_IGNORE_ATTACKER | AOE_VICTIM_TEAM | AOE_MAXIMIZE_DAMAGE
								);

				EffectBeamEntPoint( .iPlayer = 0,
								.iStartEnt = id,
								.cEnd = cAim,
								.iSprite = SPRITE_ZBEAM6,
								.iStartFrame = 0,
								.iFrameRate = 10,
								.fLife = 0.2,
								.iLineWidth = floatround(fRadius),
								.iNoiseAmp = 0,
								.iRed = 0,
								.iGreen = 0,
								.iBlue = 255,
								.iAlpha = 255,
								.iScrollSpeed = 10
							);

				return SKILL_USED;
			}
			else
			{
				client_print( id, print_center, "No Water Guns Left" );
				return SKILL_DENY;
			}
		}
	}
	return SKILL_READY;
}

PM_FUNC_NORM_ATTRIB SKILL:SkillWaterfall( SKILL_CALL:iCall, Int:id )
{
	#pragma unused id
	switch( iCall )
	{
		case CALL_REGISTER: return SkillRegister( .Name = "Waterfall", .Type = TYPE_WATER, .callTypes = CALL_BIND_DOWN, .PP = 15, .Charges = 1, .DelayTime = 1.0 );
		case CALL_HELP:     return SkillHelp( "Damages the target." );
		case CALL_BIND_DOWN:
		{
			return SKILL_USED;
		}
	}
	return SKILL_READY;
}

PM_FUNC_NORM_ATTRIB SKILL:SkillWithdraw( SKILL_CALL:iCall, Int:id )
{
	#pragma unused id
	switch( iCall )
	{
		case CALL_REGISTER: return SkillRegister( .Name = "Withdraw", .Type = TYPE_WATER, .callTypes = CALL_BIND_DOWN, .PP = 40, .Charges = 1, .DelayTime = 1.0 );
		case CALL_HELP:     return SkillHelp( "Raises the user's Defense." );
		case CALL_BIND_DOWN:
		{
			return SKILL_USED;
		}
	}
	return SKILL_READY;
}




